// mapPage.js
Page({
    data: {
      latitude: 0, // 商品纬度
      longitude: 0, // 商品经度
      markers: [], // 地图标记
      shopName:''
    },
    onLoad: function(options) {
      // 页面加载时，根据传递的选项设置经纬度和标记
      this.setData({
        latitude: parseFloat(options.latitude),
        longitude: parseFloat(options.longitude),
        markers: [{
          id: 0,
          latitude:  parseFloat(options.latitude),
          longitude: parseFloat(options.longitude),
          title:options.title,
          iconPath: 'cloud://cloud1-1gprl58p0dd92671.636c-cloud1-1gprl58p0dd92671-1326489125/image/location.png', // 标记图标路径
          width: 50,
          height: 50
        }],
        shopName:options.title
      });
    },
    onShopNameTap:function(){
    wx.reLaunch({
        url: `/pages/shop/shop?shopName=${this.data.shopName}`
      })
      
    }
  });